﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using XamlDev.ServiceLocatorPattern.ServiceInterface;

namespace XamlDev.ServiceLocatorPattern.Client.Regular
{
    /// <summary>
    /// Interaction logic for RegularImpl.xaml
    /// </summary>
    public partial class RegularImpl : Window
    {
        private ILog logBasic = ServiceLocator.GetService<ILog>("basicLog");
        private ILog logRegular = ServiceLocator.GetService<ILog>("regularLog");

        public RegularImpl()
        {
            InitializeComponent();
        }

        private void btnA_Click(object sender, RoutedEventArgs e)
        {
            string text = "Se presiono A";
            this.txt.Text = this.txt.Text + text + "\n";
            logBasic.Log(text);
        }

        private void btnB_Click(object sender, RoutedEventArgs e)
        {
            string text = "Se presiono B";
            this.txt.Text = this.txt.Text + text + "\n";
            logRegular.Log(text);
        }
    }
}
